Capture Logic more modularized, qname included, test examples added