indenting
cleaning up and adding lifecycle
adding missing lifecycle