Added documentation, refactored variable names.