Completed functionality of calculator.