Refactored modal markup and animations