improved html toolbar and engine.html functions