Remove redundant code into server file.