Added HTTPErrorException, fixed processor_code bug and improve readability