Refactors the namespacing for the API. Now it is using modules, I feel this is more elegant