Main and control classes