Adding the ability to POST json from custom.js

Simple AJAX post functionality. Also added required node modules and
moved more things.