Some implementation for SNat, along with tests.