Some unit testings
Rewrite some parts of complex examples