Refactored mutation code

Refactored mutation code to make it easier to add and delete
instructions during further development