refactoring nancyclient