Add comments; fix empty order check