implemented some of the database access functions
prettified the index and search results page