GUI and networking fixes - I think the GUI is finished.
Some work on algorithm