add componentWillLeave and tests

add removed stuff