(cleanup) added comments and grouped related code blocks
Merge pull request #7 from jimobrien/feat/io

(cleanup) added comments and grouped related code blocks