Implement js for modal
Add title handling