FIRST COMMIT

This code WILL NOT WORK in current versions of Thunderbird, and will break things. YOU HAVE BEEN WARNED