Refactor main playbook