Code refactoring in SplashScreen.java