Non-functional change

Renamed a function. Added some comments. Made log statements more self-explanatory.