         [ validate-integer-id ] >>init
         [ "id" value paste annotations>> paste-feed ] >>feed ;
 
-: validate-paste ( -- )
+: validate-entity ( -- )
     {
         { "summary" [ v-one-line ] }
         { "author" [ v-one-line ] }

    id>> "id" associate "$pastebin/paste" swap link>string ;

M: annotation entity-link
    [ id>> "id" associate "$pastebin/paste" swap link>string ]
    [ aid>> number>string "#" prepend ] bi
    append ;

: pastebin-template ( name -- template )


: <new-annotation-action> ( -- action )
    <page-action>
        [
            { { "id" [ v-integer ] } } validate-params
            "id" value "$pastebin/paste" <id-redirect>
        ] >>display

        [
            { { "id" [ v-integer ] } } validate-params
            validate-entity
        ] >>validate

        [
            "id" value f <annotation>
            [ deposit-entity-slots ]
            [ insert-tuple ]
            [
                ! Add anchor here
                parent>> "$pastebin/paste" <id-redirect>
            ]
            tri
        ] >>submit ;

: <delete-annotation-action> ( -- action )
    <action>
        [ { { "id" [ v-number ] } } validate-params ] >>validate

        [
            f "id" value <annotation> select-tuple
            [ delete-tuples ]
            [ parent>> "$pastebin/paste" <id-redirect> ]
            bi
        ] >>submit ;

