added comments, updated code.
Merge branch 'master' of https://github.com/thesaadismail/magpen