Removed dependencies on the internals of the region object. Do not store the region type in the object, it's trivial to determine from the rectangle count. Rewrote a few routines to not depend on internal clipping or region functions.