Refactor vieworders