Fixes the build and some memory issues

This addresses a bug in the clone method that was causing 16n growth in array pointers as factories were cloned. This also consolidates the singleton behavior in clone scenarios. This also adds the documentation since the newest docco version breaks everything.