Improved dielectric functions in metallic films obtained via template stripping