Refactors method that is in charges of storing best moves