Update code to comply with Rubocop