Added support for root selector. Fixes #40