Refactor large sections into smaller sections