Refactor computation module