Well, not the best reason, but the truth is is that it's how I learned javascript from The Aaron when I started as an API scripter. It's called the revealing module pattern. A benefit (especially for API scripts) is that you don't pollute the name space. Of course that's not really a concern with character sheets and there are of course other patterns that prevent polluting the namespace, but it's the pattern I'm used to, so it's what I went with. As far as efficiency or ease of readability, I don't think there's any difference between the two. EDIT: Also, look at the starfinder official code. The HUD code is deprecated and hasn't been updated in a long time (good lord, it's almost a year since I started working on the official sheet).