Added "append_to_response" feature nad some code clean up