A bit of refactoring in papers/tasks.py