Refactored calculator_spec