Another pass at indent structuring of code format

Includes lots of little clean-ups.
I suck at rebasing, adding in resource.h for better profiling in vmtest