Added some comments for clarity, part of code review, see #56.