remove reference from $data parameter; see #951

also, improve parameter descriptions