Clean up modal functionality