Implementing boundary removals in figure codes