Refactored client GUI to make it follow our architecture