split most of the display work in separate files