cleanup

This is just stuff I had from last year that cleans up the code some. Tests pass.