Added SQLAlchemy and Flask to the packages
Refactored model into state