Remove unenecessary codes