Added search and cleaned up code a little