Implemented namespace validation. Program in dire need of refactoring