Added getActionName
Cleaned up code. Removed the need for nvalues if given valueNames or both situations and values.