Update output.js

Cleaned up comments and unused code