Removing sqlite3 dependencies, adding postgresql