Clean up

Starting new js file (stack-rebuild.js) to keep everything organized.