refactor; support mocha options and phantomjs options