Refactoring AlphaBeta