Nested tunneling

Added nested tunnelling to core functionality