A couple of small cleanups

One's purely cosmetic, moving a require.

The other is a simplification (and probably optimization) of the post-to-wp routine.