Refactor most UI elements into a usercontrol