further code cleanup for Beam 5 release