Moved functions below user settings