Add javascript docs and some housekeeping