Fixes for tournament and refactoring