Add tests for player and some reorganisation