slight cleanup and commenting