Added timeout option;
Added error handling to proxy requests, so process does not die due to origin host connection problem;
Unified HTTP error responses.