Made variable name and function name styles consistent across all files.
Improved code readability. Improved documentation (mostly changing
comments to the new variable names).