Clement tests

Request to merge this branch with the trunk.
Contains the BG and a working linearity test that needs to be cleaned and automatized