Halfway commit. Working on gui.