Added support for JavaScript reloading
Fine tuning