Added flag for whether it contains data or not
Code down for recursive insert. Have not tested yet.