Added dump(). Fixed a bug that didn't work in browser.