Continued code review and minor refactoring.