Added documentation for the VW code

Also fixed some BUGS