Changes due to code review.  Renamed some functions and variables, killed a todo