Added Animation support

Optimized multiple calls for the exiting the popup and added animations
with initial state to final state and remove state.