Added basic search and some helper functions