Add a test implementation

Restructured API to make it easier to use and understand
Merge branch 'master' of https://github.com/jedesah/tournament