performance improvements, test code for model instancing, api changes