shift linkage parsing functions out of generator