A mostly working implementation minus some polish and touch ups.