Redid search structure and started implementation.

Design based off of the gosexy/db library.