changed the implementation of keys and greatly simplifying the pianogram code