Trying to get alternateAjax into custom_config.js

Also some small fixes like var declarations in helper.js, etc.