Fixes to make more flexible models