made some improvements on Calculator.java