Align code with theory. Use better default parameters.