Cleanups and Workaround for Mozilla Hierarachy Bug