The createEncoder method now has corresponding comments.