Adding some lifecycle stuff.