heavily refactor compass