Added spans rule to clean up promise passing. Updated tests