Refactor Place Order Code