LMR code cleanup