Refactor orderform and vieworders