Refactored unit tests, added phantomjs as default