Lots of updates for naming.
Fixing heap corruption (maybe?) issue.