Added callbacks to modal open and close