Dataspace: Factor out State, View and Route management.