Remove items from admin bar

This placed in functions.php removes the two items from the admin bar.
What I would like to know is can they be combined?

$wp_admin_bar->remove_node('imagify'); // This removes the Imagify menu.
$wp_admin_bar->remove_node('maintenance_options'); // This removes the maintenance menu.

Together under the one action?

// remove imagify from admin bar
add_action('wp_before_admin_bar_render', function() {
global $wp_admin_bar;
$wp_admin_bar->remove_node('imagify'); // This removes the Imagify menu.
});

// remove maintenance from admin bar
add_action('wp_before_admin_bar_render', function() {
global $wp_admin_bar;
$wp_admin_bar->remove_node('maintenance_options'); // This removes the maintenance menu.
});

Managed to get the two pieces of code working. Wanting to know if it can be slimmed down.