CHOP-52. Ensure all resources get closed properly.

Reviewed by: kiyan
CHOP-47. Part 1. Default behavior of missing values, with a test.
  * Does not include logging.

Reviewed by: robertchu