Reindent and error handling