Implemented some kind of GUI. Needs revision.