Simplify heatmap functions prior to api
Started transition to separating js/html