Changed list view to work in both vertical and horizontal mode