added comments to the class

the methods are nice and consistent with each other, though throwing a NamingException is unexpected.