Beta-version. It seems to work in all cases, porting is finished. Now I need to remove deprecated/redundunt code and write docs