Exterior molding/trim question

Im in the process of getting my wagon painted and am going to take off the trim. There is a weird little bolt which seems broken on the edge so I used a tool and began to gingerly pull the trim away from the door.vit popped off! Is that right? I also saw a square plastic piece which looks attached to the door. Should I leave it there or remove it and how? Sorry for the ignorance first time pullin stuff off like this and don't want to blow it!!!
Dave