Override elements in qc xml

Just a general comment that there are quite a lot of code for traversing hashes, checking different conditions etc. and I have some difficulty following the calls. Could some of this perhaps be parametrized for better readability?