create unit tests and refactor Constant to namespace
change some classes to namespace