updating with latest code, adding javaDocs, etc