Code cleanup

Removed SQLite functionality until completed. Cleaned up code, added
documentation.