Namespaces added, little refactoring, enums