added reactive modal rendering and scoping