Bug fixes and minor cleanup.

Read more at Watir wiki.