Added support for hide, and add tests for it.