Refactoring scripts and rigging models