added VS support and lots of code (weekend work)