Changed _close() method to public close() method