general refactoring; error messages improved, proxy feature, new parameter "header"