Renamed and refactored.
Improved variable and parameter names in several areas. Removed some unnecessary enumeration.
Introduced temporary variables to aid improve readability in several methods.