Cleanup and fixes in nat branch