Added live example and resolved some bugs