Rubocop changes 

Only rubocop changes were made to this script, it still needs to be rewritten and have documentation added