Replace tabs with spaces and remove dead code