First check of the code.  Introduced some suggestions for templates of the qd data types