improvements to tests: using PhantomJS for backend, instead of Firefox.
central logging, central wait function