only include components or labels when they exist
add close and cr commands