added NAS support and other improvements.