work to support phantom.js
some cleanup and flags to disable rendering, logincheck, and tools