Improved generation of anonymous collections