Futher improved InsertText function