move to finalize functions to finish method from onDestroy.
tune behavior of each State.