getting orders errors fixed
code cleanup