Checkin of polyfunctionality code from Lynn.