Added more tests and setup mocha-phantomjs for headless testing