finished c extension update to support _ in templates