move definitions for with-named-labels into own file