Some cleanups
Expand root only when has children
Merge pull request #28 from gregnietsky/master

Some clean ups/refactoring