Added ability to container to run methods of objects only of certain type.