Finished implementing SQLite. Untested