Updated docs and code for 3.1