Adding search function, fix bugs