Edited code samples for intra-doc consistency