Heavy refactoring

Trying to make the proper behavior for audits.