Changed function names

Changed function and variable names to reflect what they do.