Replace tabs with spaces
Various formatting fixes