Mod. Split out backend request handling to engine.py.  This will help make distinct any front end and back end code on the api.