Organize code to share similar structure throughout file