clean up whitespace
add life cycle events