fix flats, clean up indentation