Changed mainElement to use facetElement, and now JS prepended.