Move last message and transition queries to corresponding services