Add listeners package and refactor