Singleton implementation. Removed unused libaries