Cleaned up using Rubocop