Export a lookup function instead of raw templates object