Moved model over to SQLAlchemy