reindent & fix tests