improve encapsulation and remove unused instance.