Actions refactor

This looks strange, but it is because JSX is stripping the type declaration from Flow (this is a compiled file). Normally, it looks like this:

`_onModeClick(e: Event, mode: string): void {`