make plugins singletons
more tests and checks, singleton support fixed