debug viewer added
various cleanups