Upgraded to the latest version of Nancy and tidied up some threading issues