Added close function to modal