Fixed a couple small bracket issues and noted that forEach is asynchronous in documentation

Just accidentally(stupidly) assumed that forEach acted synchronously like Map.forEach and List.forEach which caused a few race conditions in my code. Felt like it might be worth it to mention it in the example so people dont make the same mistake.