Added methods to detach a lifecycle, invoke a lifecycle state and check the state