Clean up IF functions.