Refactoring Nifty 1.4

Details about the refactoring steps are in the comments, but there is no in detail description of the single changes

Unit tests are working, examples are working (as far as I can tell)

Performance is better than before, memory usage is lower.

Merry Christmas ;-)