Renamed some variables and members for better readability. Small bits of refactoring and stylistic changes.