Added server and exit routine