updated server to be a module instead