Add psycopg2
Change sqlite3 to postgresql
Refactor imports
Add head block
move styles to head block.