Improve phantomrunner, add assertions to some tests