Refactored dispatcher to use Request object