Cleanup of GUI code.

Signed-off-by: TheSniperFan <thesniperfan@gmail.com>