Code refactoring

* A lot of code was refactored to make the code easier to manage.
* All warnings from Code Analysis were fixed.
* Updated AUTHORS.txt
* Updated Copyright format in all of the files.