minor tweaks; printing heap space stats during profiling mode