Added the pointer construction utility function.