rearranged the qgram interface a bit, some documentation polishing