Tabs to spaces(refactor)