Added Functioname as enum to avoid issues with misspelled function name
as strings.