Removing unnecessary structures