Generating saved relationships, see #49, fixed a minor tree bug