Preliminary finishing of data classes and work on refactoring keyboard code.