Refactors the scripts to compute trust levels.