Automatically unspool life-cycle state named spools

This patch checks the availability of a spool named like the leaving state, directly after the leave life-cycle method was performed. If a spool is found, then it is automatically unspooled.

Cleaned up the variable usage so that less object lookups are needed