Adds TestMode
Using test mode
Fixes html debug mode