Shuffle code around for server compat