Various memset fixes and consistency changes.
Authored by: XhmikosR 2014-06-24
Parent: [r99]
Child: [r101]