Refactored database connectivity. Added Alembic schema migrations.