Fixed major bugs. Still need to test stalemate with all settings on