first half of code review comments from nsanch