Some fixes and tweaks to elwise_map