Fixed basic clock
Clean up basic problems
Move utility function
Refactor opposite player
improve comments