misc cleanup and commenting