Cleanup and modernize extension

Got rid of wfMsg*, uneeded globals, etc.
Added in a few @fixmes.

Change-Id: Ia8e3f14dafbd63407d7a429464526731ace422fd