Fix identation and update write style