made integration.js slightly less ghetto