Cleaning up namespaces and modules for api documentation

With these changes, the api documentation structure is relatively coherent.
I guess we don't need namespace anymore (or module)