Remove useless and unused codes, and also possibly exception occruable codes