Some simple clean-ups
Added a new file for search mechanics.
More bugs.