Fixed download bug and made switch/sort controls separate from data display.