Converted to library, fixed build of some old plugins