Less-ugly-code-commit
Fixed some ugly code that I wrote when removing the memory leaks from the
server, it's more attrictive now.