Implement the diff algorithm in javascript and hook its traversals up to the animation