Mostly changes to facilitate AOMRift library changes.