All of this (~ 98-143) seems much easier and cleaner to achieve using a `ModifiableValueMap`. It would also avoid dealing with all the low-level JCR Node APIs which arent pretty.

http://dev.day.com/docs/en/cq/current/javadoc/org/apache/sling/api/resource/ModifiableValueMap.html