Sorted names in the sidebar, replaced some magic numbers