This patch introduces several helper methods to deal with jobs and phases during migration in a simpler manner.