refactored ui to manage 2 views/panels