source/wand/wand.cpp: cleanded up code