Refactor OpenLib.tasks