Fixing math (damned octal).
Adding -latest to docName.
Merging oops changes in.
Renaming res-gw-discovery to the real name used in previous versions.