clean up display code