remove allocateVotes; it doesn't appear to be used.
Remove jsWindow as it is super ancient and not used
Refactor the diff functions out to Application