Removed unnecessary code and namespaces