Various performance improvements

A tight pricing loops goes from 60 seconds to 30 seconds with these changes.