Small changes in comments and debug messages.

* Added license to all source files
* Renamed lenght to length
* Added and deleted some white spaces