Changed mainElement to use facetElement, and now JS prepended.
Merge remote-tracking branch 'origin' into release