Adds rubocop and changes codes to pass