Renamed variables and methods.
Implemented the rest of Joe's refactoring suggestions.