SQLite cleanup

Cleanup code base.
Moved all class to their own namespace.