Separated the logic that accesses the warehouse from the actual tasks