major restructure to support ckeditor as an external lib
merged