cleaner code, refactor of native phantomjs require() use