code/test cleanup
update document and rename params