CFY-516 added more tests, fixed some bugs and ... else...