Simple refactoring on server side