Add valgrind support. Fix function to get words of document