Added testing framework

The server code and so forth needs to be seriously cleaned up. Will do
that once I clean up the client side testing code.