Added DOTMNamespace class

Started code refactoring to get rid of old variables and start using DOTMNamespace class.