Move delete button binding code to shared javascript file for reusability