Applies all of rubocop fixes

The idea is that assignments in conditionals are bad, since they are easy to overlook. The solution is my own.