added spinner and fixed bg image of splash screen
cleaned up code