Added inline for template functions