Couple of bug fixed, such as:
* Terminates the webserver properly with CTRL-C
* Warnings and errors from Valgrind
* Avoid recalculating a string size, when we could have done it before