Applied a standard large-scale app structure

Tally now makes use of Flask’s blueprint files and has a “factory
function” to allow multiple instances of the app to be run in testing
environments.

It’s also nice in terms of organization.