Second phase contacts refactoring