Normalize tabs and remove unused lines