Sublte changes to main.cpp needed to make last commit work.