Fixes #2 check for mocha-phantomjs installation and some cleanup