Fixed errors in connection closing.
Started implementing HTTP error responses.
Implemented returning some HTTP error responses.