Fixes some unclosed statements (and removes tunnel snakes :( )