sort orders in table by nick
implement order replay (fixes a couple of bugs compared to v1, too)