Refactoring on TaskActivity.