Unit tested and fixed bugs. Aligned ipsec config generation