Added some more events.
Added config file.
Add optional printing to console of JSON messages for debug purposes.
Make port and maximum amount of clients configurable.
Don't print stack trace on socket write error.