Documentation; changed some variable names