Added search on header, squashed a bunch of bugs