REFACTOR: Separate view from application logic

Separate code into calculator, app input/output, and View logic.