Updated to work in the client. Fixed NPEs for more minimal CDAs