implemented Singleton, Entry and improved permissions
+ fixed indentation