Add insertHTML command, which will ensure P mode when executed
Tidy up