restructed app.

client and server code is now more clearly separated and it should be easier to determine where to put future code files.