Updated to latest version and minor corrections