switches to phantomjs for testing
restructures app