Did a lot of refactoring, made the victory checking smarter, added tie checking and did some styling