Cleanup LPM sim code