Added BasketProcessing class and refactored