A moment's thought will tell you that water runs downwards so the drain will be at the very lowest point in the cabinet.
As for the dishes not being clean at the end of the cycle - what you see is food particles left on the dishes during rinsing and baked on hard during the drying process.
You can solve this by doing two things...
1) Rinse off the worst of the food debris before loading the dishes into the machine...
2) Use a good quality liquid rinse-aid rather than the less than ideal multi-tablets.
Rinse aid helps the rinse water to drain off the crockery - something to do with surface tension I think - the small particles do not remain on the dishes.
Good Luck...
February 2016