refactor closing animations for poplist and modal to use promises