Minor changes. Tested version.