more code cleanup in heat.js, pretty clean now