minor cleanup and commenting