added option to provide a request validator,
bugfixes.