Refactor infrastructure

Nothing has really changed but I cleaned up some cruft and brought it up
to the standards that we use internally at WP