Adding stub code for 'ungluing' case
Bugfix, separation of equivalent trail information to the boundary, removing dead code