change create_app to class inherit from Flask
moving command functions to manager