Clean up and simplify buffer display routines.