Added configurable victoryCondidions
Large amounts of refactoring