Added some more code to mvdtool.c