Fixed syntax errors, improved VMware support, refactored a little to clean up the code