Cleaning up charing functions.

Mostly this is deleting curft functions and moving things around to a more logical arrangement.