Simple server functions in main.c