Refactoring workflow of function calculator.