Added a few collection utils needed by rex