FIXED:   Merged all Holimans code-review issues which should fix a lot of memoryleaks.