Bugfix and start of tournament code