Refactored few functions
Implement `add_tasks` hook