variable rename
Extracted into class, added comments.