Renamed property for clarity; added some comments.
Added debug output.