Refactored code and implemented necessary methods for run-time
generation of operations.