Infrastructure of plugins

close #51