Refactoring numeric calculator, taking out unnecessary arguments