adding improvements to application peristence, application remove event