Fix Valgrind warnings appearing during the test suit.
Fix initialization orders
Merge branch 'valgrind' of https://github.com/ZobyTwo/wagic into ZobyTwo-valgrind