Fix hash syntax and rubocop errors