refactoring key class and add simplecov gem