Additonal refactoring, working on the auto play.