Huge code refactoring and "imrpovement", read the comments at headers.
Merge commit '0b30a005d20042cf3ba1e6eee9e247ebd400840d'

Conflicts:
	source/cpp/Viewport.h