CMS-1868 Rename lib to remote (RemoteService.ts)
Moved RemoteService argument types, organized classes by functional area.