Added grouping ability to InputMethod.
Modify phone.cin and other things to accomodate the 'grouping' mechanism.