Minor refactoring and start adding player tests

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>