Clean up fn compilation code