refactoring (see #5), now the server code adheres to proper directory layout, no more globals in server code.