Improve code to improve readability, add print_cookbook method