Better list sorting

and better alignment of the close button for tabbed panels.