Cleaned up if-then blocks

Consolidated down to a single block of code, converted to a dictionary with lambda functions.
Fixed nlargest on every iteration

Realized the fallacy of this after a good night's rest. Now running nlargest at the end after loading everything into a heapq. Not ideal as it could cause memory issues, but I was able to successfully parse a 2.5m record rdb and grab the top 10 largest keys without any issues.