Model definition completion and cleanup - first phase