A little adjust with swap time and remove useless code.