Activating sql auditing tests

and some refactorings
Nit: while you're at it, can you replace tabs with spaces