Rubocop

adds rubocop checks to travis, and fixes most rubocop errors. Fixes #217