Refined code layout. Packed midi commands and keyboard input parsing actions into functions. Created key object.