refactor RestBundle listeners