Clean up the codes