enable rubocop rake task
refactor for rubocop

some small changes to satisfy rubocop