Refactored code into package; refactored Flask routes into Blueprints.