cleaned some more code, made the minimax functions static