Cleanup of ha.js