I've started developing a new module that displays sections/categories in the following way

I've got (borrowed

As you can see, I've put lots of parameters so the module can be very configurable, but there's still lot code to put for it to work as it should
My first question:
1. How should I generate the URL for the links for
a: Categories
b: Sections
Having into account that the links are generated from this module, and not by the std. joomla menu manager ?
Thanks a lot in advance, and any1 is welcomed to take part in development of this new module
