Make things more generic

* Forbid direct access to underlying tree

* Move to Java 7