Refactor namespaces

merged with the namespaces changes