Display code cleanup