Sync with main development repo

Replaced LocalAlloc with HeapAlloc in utils, updated WindowProcedure
callback, fixed some issues found with analyze, and minor
cleanup/refactoring.