added memoization to minimax
cleaned up requires