Some code cleanup for axis.js