Big refactoring with adding namespaces to remove the chaos