Created gui and seperated the controller from the view