Added header guard
Caused exception to be thrown when parsing fails
Added check for root node being a notestree node