Refactored GUI for MVC paradigm.