Allow setting of root for nested elements.

This means that you can override the #root defined in any nested #element(s).
Also adds lots of nice documentation to the public interface.