64bit issues / memory leaks / multiple updates

- Fix some 64bit-OS problems for high memory processes
- Fix some memory leaks/corruptions
- Apply most of patch 7313 from http://adui.codeplex.com/SourceControl/list/patches.