Adding wig code.
Merge pull request #827 from ggirelli/master

Adding wig code.