Activating sql auditing tests

and some refactorings
done