Implemented searching and did a few small fixes