Re-ordered function definitions on server-side