added namespaces and removed some db related classes