Added flake8 fixes. Saving input and results to DB