working. more cleanup. pushed a lot of functions into what I considered better homes for them, renamed a bunch of functions. thank goodness for refactoring browsers and regression tests.