Added config file for the server implementation aswell.
Cleaned up some of the code.