refine plugin structure.