ModelData cleanup and dead code elimination