Fix requesthandler + add test coverage for the requesthandler.