Updated lifecycle to use countdown latch