Some rafactoring. Using one-class file app.py instead multi-class module engine.py in core.