Issue refs #1367: implement lookup aggregate directive (single version), remove debug code, fix html5 form validation, integrate into form