Namespaces implemented, some uesless steps removed form the code.