Fix bug in table naming. Small tweaks to the codebase to allow integration with Alembic (migrations).