Fix to module copy code which prevented it from working before
Renamed CalStartDate to EndDateOrNow
Removed excess wrapper from JS codeblock