Improve code (use more OO, split up the-party.js).