* Completely rewritten to be less obtuse. * Consolidated the two variants. * Renamed to be clearer about what they do.