New design finished.

The new design has been finished. It may still need some tweaks before
0.5 release.

Unit tests have been fixed for the change to search.