Initial commit of tunnel refactoring