Added new utilities: indexed models, programs. Refactoring.