Tidy up dirty monkey patching