Changed some typedefs on order handling