Refactor to use packages.

This is prior to changes to use matching service for login process.

Removed repeated tests in test_audit