Split up prepareCookbooks method