Move modal dismiss listener to proper file