format code,replace tab to space,fix duplicate add tile