Sped up the algorithm slightly, added some coloring for demonstration purposes, did some binding-y things