cleaned up duplicate code in ui files. changed controller and network so that the model does not communicate directly with view.