Code optimization, bug fixes.

Optimized JavaScript test insertion in HTML.
Optimized JavaScript secure code generation.
Fixed bug with JavaScript test at contact forms.