added comments to functions
Merge pull request #3 from mephistopheies/pn-refactor

added comments to functions