Added interface for collections. TODO: tests.