Refactor javascript used to switch search result views
Make search result views sticky with pagination