refactor(affinity manager) refactor to extend api manager