Remove unneeded codes