Reinitialized custom funcs from vars to defuns
Reorganized
Heatmap input creator

Renamed some variables