Merged in partial content from v1.66-captain-ulex work.