Adds rubocop and updates codes to pass