Implemented Append child

Hi Craig,
I re-implemented appendChild along your lines of thinking.
The implementation is much simpler. :-)
Please review and pull if deemed better.