Refactoring order controller and adding headless tests based on casperjs.