-Rewrite of GUI code