Added comments to aat statistics code.
Added queries for iconclass.
Squashed a sorting bug and imporved naming.