Cidb

Added results database searching and a few minor changes/refactors