Refactor so that the logic is externally callable.
Cleaning up code.
Integrate in memory word counts into rest server.
Integrate in memory word counts with the rest server.