split mailbox_display in functions. Added UID support, adapt it to make is