Unit tests and Namespaces

Applicant unit test should be done and removed some duplicate name
spaces from some files