Made dialog code more modular, added class for tournament prefs