Code polishing

Huge code auditing, tune-up, polishing, setting up copyrights
and some rebranding of several source code files and CMake scripts.