Some minor improvements to keys