remove all unnecessary codes.