minor code optimizations.  the debugging spew makes me think everything is working well