cleaned up the code and classified some things especially in mutation.py
updated the ruby_controller to handle errors better