removes some dead code; adds switch to disable debug logging of paths etc during offseting
adds a few more autoreleasepools in loops, increases number of spatial hash cells to improve performance