added splash, cleaned up main function