Improved codes

* Added constant for codes 500, 502 and 503
* Replaced tabs with spaces
* expect() returns en Unexpected exception instead of
no response in case of empty response