added republishing of incoming orders and did some cleanup