Added a close class method.