server side class refactoring