Cleanup

In CopySerializer, convert the huge conditional chain statement to a switch; a little faster, and a lot more readable.