make and/or switch configurable
add xref/mref edit mode persist
remove unused fuctions