Server side refactor