Switch implementation.
Adding FlowAction to bind together an action and a flowMemory.
Adding Javadoc.