clean up code & order routing