Map locks and cleanup