Replace explicit constructor calls with case class copy method.