added "setHtml" feature and fixed some compiler warnings