Finish new algorithm
Some GUI fixes