Did you look at one of the extensions? They do the stuff the right way, you could simply copy one of those. I had a quick look at your code but did not see any errors. It is probably something trivial.
I did look at other extensions. That's how I got this far, but I can't seem to figure out what the deal is. I was hoping it was some undocumented trivial setting that I did not configure and could easily be spotted by the community.