some tools added
safe templated singleton implemented