a series of refactoring of HP_ARMM

Most parts are modified, maybe. The rest errors are ralated with
Keyboard function. It should be reffered to client data structure.