Added detail comment, author validation

Add detail comments for codes. try to validated author but cannot get
the regex working, optimised some codes.