added tests, some examples and doc
pointer conversion in lv.c
qgram functions now return integers not doubles