(feat) Added partial function handling to template.rs