Code format, copyright headers and comments

During the code review I performed some small tasks on every file (but not for tests):

- Code formating 
- Add copyright headers to every file
- Added some comments
- Remove unnecessary constructors and fixed some minor code glitches