Readablity and supportability improvements

Includng code comments, renames and refactoring motivated by code review
feedbacks.