Last changes for the threshold project, tests upcoming soon.