Clean up unneeded codes.