Prune unnecessary parts.