Clean up cr code