Refactored HasTree options and added validation of options

- Current spec status: 63 examples, 0 failures.
Increment version to 0.4.1 for release.