Final code improvements

- improvement of SIG_V1, SIG_V2 and SIG_V3
- implementation of SIG_V4
- improvement of the code design