Item-item memory use improvements

Attempt to improve the performance of item-item model builds, and provide some small Gradle build tweaks.