Remove duplicate code from icr