many NAT improvements and improved API