Moving logic to splash screen