Email backup added. Unique reference generation added.