adds comments and code refactor
Merge pull request #17 from c2y3dc/master

adds comments and code refactor