Polished search plugin

Main fixes:

* Changed object state mechanism to use suffixes
* Reduced the scope of several variables
* Added a central `LICENSE` file
* Added lots of comments
* Polished source code