fix up some things in preparation for javascirpts.