cleanup and indentation (by martin)