Adding License header on each file

Adding License header on each file.
I'm not sure if GNU 3 will be the latest licence option that I would
like for my project.

Simplify exception cath on some files
some little changes in comments.