Fixed win condition bug, code clean-up.
Merge branch 'develop'