Clean up pyflakes and move functional mixin to common place
ORM works with postgres