Updated server file with base code