sorting algorithm tweaks
added footer, improved dropdown hiding