Changed mainserver to an argument