Fixed bugs with plaineditor
Added avalonedit stuff
Implemented switching between avalon and plain