Refactoring

remove unused namespaces etc.