Fixed win condition bug, code clean-up.