Optimized zipping functions

This improves the zip operation speeds anywhere from 2x to 10x.