Refactor entire program to use hashes instead of arrays to store word/run pairs