misc changes to library
Fixed a divide by 0 error in power_model_mem due to 'mem_prev_freq' being 0