Getting line items for Cart from backend. Some refactoring also.