lcd code cleanup