Moves some functionality to calculator.py, and closes #5