Use a dictionary of Title:Action to keep track of which action to use for buttons