Clean up leaks and prep WordPress code