Search function implemented

with extra code to seperate admin-functions.