Added dot.js, bug fixes