Re-worked namespaces, optional feature and fixes
Added optional feature to generate packaged based namespaces, defaults
to false to ensure compatibility.
Reverted multiple changes to apply more cleanly to master branch.
Fixed extensions