Updated layout

Updated layout and made sorting happen as soon as selected without
having to push button.