Adds rubocop and changes codes to pass

You're right. I was just following the rules. @zamith can you comment on this?