Adding clear function to modal