vm: Reorganize functions, comment them, and less exporting.
vm: Reorganize functions, comment them, and less exporting.

I noticed that quite a few functions weren't marked as static properly, so I
did that as well. No change in functionality, just reorganizing stuff. :)

FascinatedBox/lily,jesserayadkins/lily,FascinatedBox/lily,jesserayadkins/lily,FascinatedBox/lily,jesserayadkins/lily,FascinatedBox/lily