Fixed most major rubocop warnings