Wad format added and some small modifications