Reorganize the app and add psycopg2 and SQLAlchemy.