Win lose conditions.

Many bug fixes