Added more actions, and some code to select between them.