Rubocop ified

Rewrite according to Rubocop guidelines. Much easier now that I have the sublime text 'rubocop package.