Fixed: incorportated Nolan's suggestions including fixing namespaces