Cleaned and commented display code.