Closes #1244 and adds some additional validation for orders.