Sync toolkit.
Remove redundant code.
Fix incorrect sizeof() uses.