Implemented calculator
Refactoring