Refactored modal to not use a directive