Add WYSIWYG editor, minor code improvements