more moving to subfunctions, and rename of show-key