find and replace error along with other style fixes