So many nested functions! Everywhere! I worry since function calls are expensive, and it's harder to test.