Fixed filehandling.

Also, renamed TreeMember to TreeNode