Added getInstances and contains method and added optional qualifiers to  getInstance method
Updated to use new getInstances method