Ports improvements from IG2 to IG3

Ports improvements from IG2 to IG3.

Also fixes all Java warnings in RemoteContentService.