across the board bug fixes and optimizations for collections