fixed some things post code review.