Restructure server part