Merging CDK-139 branch.

This includes changes that address CDK-123 and implement CDK-161.