Fixes #25 - Add utils and simplify output.js