added test for duplicate records in key, and renamed key controller to keys