Common code blocks