Added graph support, improved gui, fixed problem in algorithm.
(Improved the public interface of the solver)