Implemented computeKeysAndScores method.
Implemented other methods as well.