Remove sqlalchemy rebased

Rebased and fixed conflicts and tests from #158