Copy updates from REL1_4, break out function definition to an include file