refactoring a bit leading up to executing javascript tests.  so close i
can taste it