refactoring views and added method for returning search results
refactoring and formatting the views