Multiple minor corrections (static analyzer)
added valgrind test to travis