Refactored away using pointers for passing the operation type values.