Close function made public