Updated Logic.java as Singleton.