Tree implementation from lab in header