Working on adding function handling to Sections
Refactored function handling for Sections in template.rs