Cleaned Up GUI Code

See differential for details.