Improving warehouse code