Delete useless code and modify coding style.