      uid' = case readMaybe ("0x" <> unpack uid) of
               Nothing -> Left ("Could not parse uid: " <> unpack uid)
               Just x -> Right x
  in case method of
    Add -> pure . addItem catname it
    -- @REFACTOR
    Mod -> \r -> (\u -> modItem it{_uid=u} r) <$> uid'
    Del -> \r -> flip delItem r <$> uid'
runCommand Cat{method,catname,newname,description} =
  let it = Category {_name=newname,_description=description,_items=[]}