Refactoring: remove comment, reorder imports

Small changes based on Will's suggestions.
Refactoring: rename variable, make logic readable

Small changes based on Will's suggestions.