Removed shared_ptr from contract method, replaced with class optional_ptr which combines functionality of raw pointer and unique_ptr depending on how it is initialized.
Merge remote branch 'upstream/master'
Merge remote branch 'upstream/master'
Fixed some missing includes.