Bug 920823 - Code cleanup and other improvements. r=mwu
Bug 920823 (followup) - Link with liblog. a=bustage