more code

added logging
broke out browser into subclass of mechanize.Browser