code review, and fixed some other random nits I found