Remove unnecessary codes