Address comments from previous round of reviews, fix bugs