Made server main a class