Separate gui code from backend code.