added Key and KeyTest and updated things to use it