renamed variables, tweaked docs