Fix compatibility with sqlalchemy >= 0.9 and minor code improvements.
Increment version to 0.8.1