Added flags for different running locations and for profiling
trying to find deadlock
fixed bug where map keys weren't being deleted so postprocessing was happening a lot