Make Control.checkAppKey private and some minor changes