Cleanup excess bracks and lines.