Made the code modular for BOPIS