Refactor to stop using obj-c categories