Fixed the refactored version, removed app.py, added error feedback on bad input files. Reviewed-on: #2