Code cleanup of order.cpp