Added feature to allow a "rootElement" DOM Element (class or ID) that the layout template can be appended to

Added feature to allow a "rootElement" DOM Element (class or ID) that layout template will be appended to. 
If the rootElement is specified, the layout template will be appended to it, instead of appended to the body tag.

The rootElement is a string of the form ".someClass" or "#someID"