Primarily for encapsulation, not polluting the global namespace with lots of functions.

How are functions easier to debug?

And for performance, these functions are not going to be called millions of times :smile: