Moved playSound function and fixed indent

Made it consistent with the functions in alphabetical order