Updated with code cleanup from code review performed July 1