[FIX] some warnings removed
[FIX] replaced some copy’n’paste functions