Added keyboard struct, some polishing and deleted thrash code.