some cleanup and indentation fix