Custom version of joy.js (bugfixes). Added comments