Worked around mongoose toObject

Also tried elementary memory leak fix