Remove unnecessary codes
Clear emit code