Webapp big refactor

#348
You should add test for situation when order is given but direction not